//
//  Macro.swift
//  WB
//
//  Created by leador on 17/5/15.
//  Copyright © 2017年 袁满. All rights reserved.
//

import Foundation
import UIKit

// MARK: - 常用宽高

/// 屏幕Bounds
let kScreenBounds = UIScreen.main.bounds;

/// 屏幕高度
let kScreenHeight = UIScreen.main.bounds.height;

/// 屏幕宽度
let kScreenWidth = UIScreen.main.bounds.width;

/// 导航栏高度
let kNavBarHeight = 44.0;

/// 状态栏高度
let kStatusBarHeight = 20.0;

/// Tab栏高度
let kTabBarHeight = 49.0;

// MARK: - 系统版本

/// 获取系统版本号
let kSystemVersion = Float(UIDevice.current.systemVersion);
/// 是否IOS7系统
let kIsIOS7OrLater = Int(UIDevice.current.systemVersion)! >= 7 ? true : false;
/// 是否IOS8系统
let kIsIOS8OrLater = Int(UIDevice.current.systemVersion)! >= 8 ? true : false;
/// 是否IOS9系统
let kIsIOS9OrLater = Int(UIDevice.current.systemVersion)! >= 9 ? true : false;


//MARK: ---常用颜色---

/// 根据RGBA生成颜色(格式为：22,22,22,0.5)
var ld_RGBAColor: (CGFloat, CGFloat, CGFloat, CGFloat) -> UIColor = {red, green, blue, alpha in
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha);
}

/// 根据RGB生成颜色(格式为：22,22,22)
var ld_RGBColor: (CGFloat, CGFloat, CGFloat) -> UIColor = {red, green, blue in
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1);
}

